/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package controllers;
import model.*;
import dataaccess.BaseDao;
import play.*;
import play.mvc.*;
import dataaccess.ProjectDataAccess;
import views.html.*;
import play.db.jpa.Transactional;



/**
 *
 * @author overflow012
 */
public class Proyectos extends Controller {
    
    public static Result index() {
        return ok(listaProyectos.render(ProjectDataAccess.getAll()));
    }
    
    @Transactional
    public static Result listaProyectos() {
        return ok(listaProyectos.render(ProjectDataAccess.getAll()));
    }
    
    @Transactional
    public static Result getProyecto(Long projectid){
        return ok(verProyecto.render(ProjectDataAccess.getById(projectid)));
    }
    
}
